package com.hgyc.mom.tool.entity;

import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.*;

import com.hgyc.mom.common.annotation.Excel;
import com.hgyc.mom.core.annotation.DictColumn;
import com.hgyc.mom.core.annotation.TableDict;
import com.hgyc.mom.core.mybatis.EQ;
import com.hgyc.mom.core.mybatis.Like;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * <p>
 * 标签打印模板
 * </p>
 *
 * @author fwj
 * @since 2025-07-14
 */
@Data
@TableName("tool_print_template")
@Schema(name="标签打印模板对象", description="标签打印模板对象")
public class PrintTemplate implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "")
    private Long id;

    @Excel(name = "名称")
    @EQ
    @Schema(description = "名称")
    private String name;

    @Excel(name = "模板类型")
    @Schema(description = "模板类型")
    private String type;

    @Excel(name = "物料ID")
    @Schema(description = "物料ID")
    @TableDict(table = "base_material", key = "id" , columns = {
            @DictColumn(name ="material_code", alias = "materialCode"),
            @DictColumn(name = "material_name", alias = "materialName")
    })
    private Long materialId;

    @Excel(name = "客户ID")
    @Schema(description = "客户ID")
    @TableDict(table = "base_client", key="id", columns={
            @DictColumn(name="client_name", alias = "customerName")
    })
    private Long clientId;

    @Excel(name = "模板文件名称")
    @Schema(description = "模板文件名称")
    private String templateFileName;

    @Excel(name = "模板文件")
    @Schema(description = "模板文件")
    private byte[] templateFile;

    @Excel(name = "hiprint模板数据")
    @EQ
    @Schema(description = "hiprint模板数据")
    private String templateJson;

    @Schema(description = "模板校验码")
    private String checkSum;

    @Schema(description = "数据源")
    private String dataSource;

    @Excel(name = "是否默认")
    @Schema(description = "是否默认")
    private Integer isDefault;

    @Excel(name = "启用状态")
    @Schema(description = "启用状态")
    private Integer enableFlag;

    @Excel(name = "备注")
    @Schema(description = "备注")
    private String remark;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建人")
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "")
    private Long updateBy;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "")
    private LocalDateTime updateTime;

}
